---@class DIYUtility
local DIY = require "packages/diy_utility/diy_utility"

local skill = fk.CreateSkill {
    name = "ym1__zhu",
    tags = {DIY.ReadySkill}
}
skill:addEffect("active",{
    card_num = 0,
    target_num = 0,
    card_filter = Util.FalseFunc,
    target_filter = Util.FalseFunc,
    can_use = function(self, player)
        return true
    end,
    on_use = function (self, room, effect)
        local player = room:getPlayerById(effect.from.id)
        local cards = player.room:getCardsFromPileByRule("slash", 1, "discardPile")
        if #cards > 0 then
            player.room:obtainCard(player, cards[1], true, fk.ReasonJustMove)
        end
        local skills = {}
        for _, s in ipairs(player.player_skills) do
            if s:isPlayerSkill(player) then
                table.insert(skills, s.name)
            end
        end
        room:setPlayerMark(player,"ym1__zhu",skills)
        room:handleAddLoseSkills(player,"-"..table.concat(skills,"|-").."|ym1__tian|ym1__fa",nil,true)
    end,
})
Fk:loadTranslationTable{
    ["ym1__zhu"] = "诛",
    [":ym1__zhu"] = "<a href='rfenghou_ready_skill'>蓄势技</a>，出牌阶段，你可以获得弃牌堆里的一张【杀】，然后令本轮内你的技能视为两个独立的“罚”。",
    ["@@rfenghou_readying:::ym1__zhu"] = "诛 蓄势中",
    ["rfenghou_ready_skill"] = "<b>蓄势技</b>：一种技能标签，拥有此标签的技能发动后失效，直到牌堆洗切后重置；出牌阶段，你可以弃置三张牌，"..
    "重置一个本轮未发动过的蓄势技。",

    ["$ym1__zhu1"] = "感受我的痛苦！",
    ["$ym1__zhu2"] = "把他们撕成碎片！",
}
return skill